home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_20_1987_Transactor_Publishing.d64
/
un auto-run
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
1KB
|
51 lines
10 rem * this program changes auto-run
20 rem * programs back to their
30 rem * original basic format
40 rem * written by doug resenbeck 10/86
50 printchr$(147)chr$(17)chr$(17)
60 print" name of basic auto-run program"
70 print:inputar$:t=len(ar$)
80 gosub440
90 ifs=1thens=0:goto50
100 printchr$(147)chr$(17)chr$(17)
110 print" new name with auto-run removed"
120 print:inputua$:t=len(ua$)
130 gosub440
140 ifs=1thens=0:goto100
150 printchr$(147)chr$(17)"auto-run "ar$
160 printchr$(17)"to"
170 printchr$(17)"un/auto-run "ua$
180 printchr$(17)"please wait"
190 open2,8,2,ar$+",p,r"
220 open8,8,8,ua$+",p,w"
250 get#2,a$,b$
260 ifa$=""thena$=chr$(0)
270 a=asc(a$)
280 ifb$=""thenb$=chr$(0)
290 b=asc(b$):c=a+256*b:d=2049-c
300 ifd>0then320
310 printchr$(147)chr$(17)"program is not a basic auto-run program":goto380
320 forx=1tod:get#2,a$:next
330 print#8,chr$(1);
340 print#8,chr$(8);
350 get#2,a$:sw=st:ifa$=""thena$=chr$(0)
360 print#8,a$;:ifsw=0then350
370 printchr$(147)chr$(17)"done"
380 close2:close8
390 gosub480
400 ife>0then500
410 printchr$(17):input"more";n$
420 ifn$="y"then50
430 end
440 ift<17thenreturn
450 printchr$(17):print"filename too long"
460 forx=1to1500:next:s=1
470 return
480 close15:open15,8,15
490 input#15,e,e$,tr,s:close15:return
500 print"disk error #";e
510 printe$
520 print"track";tr
530 print"sector";s
540 close2:close8